<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>全部读者</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
    <script th:src="@{/js/jquery-3.2.1.js}"></script>
    <script th:src="@{/js/bootstrap.min.js}" ></script>
    <style>
        body{
            background-color: rgb(240,242,245);
        }
    </style>

</head>
<body>
<div th:replace="components/adminPublicComponents::topbar"></div>

<div class="panel panel-default" style="position:relative;top: 80px;width: 90%;margin-left: 5%">
    <div th:replace="components/adminPublicComponents::message"></div>
    <div class="panel-heading">
        <h3 class="panel-title">
            全部读者
        </h3>
    </div>
    <div class="panel-body">
        <table class="table table-hover" >
            <thead>
            <tr>
                <th>读者号</th>
                <th>姓名</th>
                <th>性别</th>
                <th>生日</th>
                <th>地址</th>
                <th>电话</th>
                <th>编辑</th>
                <th>删除</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="readerInfo:${readerInfos}">
                <td th:text="${readerInfo.getReaderId()}"></td>
                <td th:text="${readerInfo.getName()}"></td>
                <td th:text="${readerInfo.getSex()}"></td>
                <td th:text="${readerInfo.getBirth()}"></td>
                <td th:text="${readerInfo.getAddress()}"></td>
                <td th:text="${readerInfo.getTelcode()}"></td>
                <td><a th:href="@{/reader/edit(readerId=${readerInfo.getReaderId()})}"><button type="button" class="btn btn-info btn-xs">编辑</button></a></td>
                <td><a th:href="@{/readerDeleteDo(readerId=${readerInfo.getReaderId()})}"><button type="button" class="btn btn-danger btn-xs">删除</button></a></td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>
